<!--The content below is only a placeholder and can be replaced.-->
<div>
  <span class="button" (click)="show('pForC')">父组件向子组件传递信息：通过属性</span><br>
  <span class="button" (click)="show('cForP')">子组件向父组件传递信息：通过事件</span><br>
  <span class="button" (click)="show('pGetC')">父组件获取子组件的信息：通过调用模板引用变量</span><br>
  <span class="button" (click)="show('pCService')">父组件和子组件共享信息：通过服务共享信息</span><br>
  <span class="button" (click)="show('pGetCV')">父组件获取子组件的信息：通过@ViewChild 或@ContentChild</span><br>
  <br>
</div>
<div *ngIf="showContent === 'pForC'" class="content">
  <app-parent></app-parent>
</div>
<div *ngIf="showContent === 'cForP'" class="content">
  <app-parent2></app-parent2>
</div>
<div *ngIf="showContent === 'pGetC'" class="content">
  <app-parent3></app-parent3>
</div>
<div *ngIf="showContent === 'pCService'" class="content">
  <app-parent4></app-parent4>
</div>
<div *ngIf="showContent === 'pGetCV'" class="content">
  <app-parent5></app-parent5>
</div>
